Persist mouse-gesture binding selection, add numeric chooser and wheel-gate#773
Merged
multiplex55 merged 2 commits intomasterfrom Jan 31, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
mouse_gestures_state.json) and helper functionsload_selection_state/save_selection_stateto persist last-selected binding index per gesture (keyed by label::tokens).MouseGestureConfigwithwheel_cycle_gateand newWheelCycleGateenum, wired through plugin settings (MouseGestureSettings) and the GUI settings dialog (mouse_gesture_settings_dialog.rs).service.rsto initializeselected_binding_idxfrom stored state when an exact candidate appears, and to save selection onSelectBinding/ wheel-cycling changes.format_hint_textto output a numbered binding chooser (e.g.1) Action A,2) Action B) and to include updated hint text describing the wheel gate and numeric selection.HookEventto includeCycleNext,CyclePrev, andSelectBinding(usize)and updated hook logic to map mouse wheel to cycle events and 1-9 key presses toSelectBindingwhen a gesture is active; added platform gate logic so wheel cycling can be gated behind deadzone orShift+Wheelon Windows.wheel_gatestate to the WindowsHookDispatchand appropriate logic inmouse_hook_proc/keyboard_hook_procto enforce the gate and forward cycle/select events.tests/mouse_gestures_service.rscovering selection persistence across gesture sessions and numeric selection updating the hint overlay, and adjusted an existing hint text assertion to the new format.Testing
cargo fmtsuccessfully to format changes.cargo test mouse_gestures_service, but the test run failed during build due to an external system dependency (missing systemalsa/alsa.pc) required byalsa-sys; the added tests are present but could not be executed in this environment because of that missing native dependency.Codex Task